﻿using Axis.BusinessObject.Core;
using Axis.Web.Administrator.Global;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Axis.Web.Views.Project
{
    public partial class ucProfileForProject : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                GetListData("Class", ddlClass);
                GetListData("MaritalStatus", ddlMaritalStatus);
                GetListData("Education", ddlEducation);
                GetListData("Job", ddlJob);
                GetListData("Province", ddlProvince);
                GetListData("HouseholdIncome", ddlHouseHoldIncome);
            }
        }
        protected void GetListData(string functionCode, DropDownList ddl)
        {
            IList<CListData> list = new CCore().GetListData(functionCode);
            ddl.DataSource = list;
            ddl.DataTextField = "Name";
            ddl.DataValueField = "Value";
            ddl.DataBind();
            ddl.Items.Insert(0, new ListItem("","-1"));
        }
    }
}